#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <alloc.h>
#include <assert.h>

#include "graph.h"

void showMenu(); // Hien thi cac chuc nang lua chon

int main()
{
    showMenu();
    
    getch();
    
    return 0;   
} // end main()

void showMenu(){
     
    int choose;
    
    while(1){
        printf("\n\n==============================================\n");
        printf("  CHUONG TRINH GIAI BAI TOAN DUONG DI EULER");   
        printf("\n==============================================\n"); 
        printf("\t 0. Create Graph\n\t 1. Destroy\n\t 2. Output Graph\n"  
                 "\t 3. Neighbourhood of the vertex\n\t 4. Insert vertex\n\t 5. Insert edge\n"  
                 "\t 6. The number of vertices\n\t 7. The degree of the vertex\n\t 8. Check connected Graph\n"  
                 "\t 9. BFS\n\t10. DFS\n\t11. Find shortest path\n\t12. Cycle graph\n"
        ); 
        printf("----------------------------------------------\n");
        printf("  Chon chuc nang: ");
        scanf("%d", &choose);
        assert(choose);
        printf("\n\n");
        
        switch(choose){
             case 0: // Create Graph
                  system("cls");
                  int ch;
                  while(1){
                          printf("\n\t 1. Nhap tu ban phim\n\t 2. Nhap tu tep tin\n");
                          printf("\n\tChon chuc nang tao do thi:  "); 
                          scanf("%d", &ch);
                          printf("\n\n");
                          
                          switch(ch){
                                     case 1:
                                          system("cls");
                                          
                                          break;
                                     case 2:
                                          system("cls");
                                          
                                          break;
                                     default: system("cls");
                                              printf("\nWrong choice, Pls reselect!\n"); 
                                              showMenu();       
                          }
                  } // end while [choose 0]
                  break;
             case 1: // Destroy
                  system("cls");
                  // dosomething()
                  break;
             case 2: // Output Graph
                               system("cls");
                               // dosomething()
                  break;
             case 3: // Neighbourhood of the vertex    
                               system("cls"); 
                               // dosomething()
                  break;
             case 4: // Insert vertex
                               system("cls");
                               // dosomething()
                  break;
             case 5: // Insert edge
                               system("cls");
                               // dosomething()
                  break;
             case 6: // The number of vertices
                               system("cls");
                               // dosomething()
                  break;
             case 7: // The degree of the vertex
                               system("cls");
                               // dosomething()
                  break;
             case 8: // Check connected Graph
                               system("cls");
                               // dosomething()
                  break;
             case 9: // BFS
                               system("cls");
                               // dosomething()
                  break;
             case 10: // DFS
                               system("cls");
                               // dosomething()
                  break;
             case 11: // Find shortest path
                               system("cls");
                               // dosomething()
                  break;
             case 12: // Cycle graph
                               system("cls");
                               // dosomething()
                  break;
             default: system("cls");
                      printf("\nWrong choice, Pls reselect!\n"); 
                      printf(">>>\n");
                                                        
        } // end switch
    } // end while
} // end showMenu()

